<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function Dog(name, age) {
        this.name = name;
        this.age = age;
      }
      Dog.prototype.email = '1222';
      Dog.prototype.eat = function () {
        console.log('haha');
      };
      Object.prototype.drink = function () {
        console.log('heshui');
      };
      var cat = new Dog('lisi', 18);
      for (var k in cat) {
        console.log(k);
      }
    </script>
  </body>
</html>
